﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="http://netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<title>lecture2a</title>
<style>
    div table.table { width: 500px; }
</style>
</head>
<body>

<div class="container">
    <h1>JSTL Test1</h1>

    <table class="table table-bordered">
        <tr>
            <td>year</td>
            <td>${ year }</td>
        </tr>
        <tr>
            <td>month</td>
            <td>${ month }</td>
        </tr>
        <tr>
            <td>user1.name</td>
            <td>${ user1.name }</td>
        </tr>
        <tr>
            <td>user1.age</td>
            <td>${ user1.age }</td>
        </tr>
        <tr>
            <td>user2.name</td>
            <td>${ user2.name }</td>
        </tr>
        <tr>
            <td>user2.name</td>
            <td><c:out value="${ user2.name }" default="데이터 없음" /></td>
        </tr>
        <tr>
            <td>tag - JSP EL 출력</td>
            <td>${ tag }</td>
        </tr>
        <tr>
            <td>tag - JSTL 출력</td>
            <td><c:out value="${ tag }" /></td>
        </tr>
        <tr>
            <td>script - JSP EL 출력</td>
            <td>${ script }</td>
        </tr>
        <tr>
            <td>script - JSTL 출력</td>
            <td><c:out value="${ script }" /></td>
        </tr>
    </table>

    <div>
        <a href="/lecture2a/index.jsp" class="btn">index.jsp</a>
    </div>
</div>

</body>
</html>
